import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description: 牛客网.入门题.计算商场折扣
 */

class Main {
    public static void main(String[] args) {
        Scanner console = new Scanner(System.in);
        int price = console.nextInt();
        int cost = 0;

        //write your code here......
        double discount = 1;
        if(price >= 5000) {
            discount = 0.6;
        }else if(price >= 2000) {
            discount = 0.7;
        }else if(price >= 500) {
            discount = 0.8;
        }else if(price >= 100) {
            discount = 0.9;
        }
        cost = (int)(cost * discount);
        System.out.println(cost);
    }
}

public class Test {
}
